<#-- table -->
<#macro Table id="" style="" class="" checkboxname="">
    <#assign CheckBoxName=checkboxname/>
    <#if CheckBoxName !="">
        <#assign CheckBoxValues=ParameterValues(checkboxname)/>
    </#if>
    <#if class=="">
        <#assign CurrentTableType="DefaultTable">
    <#else>
        <#assign CurrentTableType=class>
    </#if>
    <div class="${class}_Outer">
        <table id="${id}" style="<#if style=="" && CurrentTableType="DefaultTable"><#else>${style}</#if>" class="${CurrentTableType}">
            <#nested>
        </table>
    </div>
    <#assign CurrentTableType="">
    <#assign CheckBoxName=""/>
    <#assign CheckBoxValues=[]/>
</#macro>

<#-- simple head -->
<#macro SimpleHead labels sorters=[] namespace="" oncheckboxselect="" checkboxselect="false">
    <thead>
        <tr>
            <#if CheckBoxName!="">
                <th width="1px">
                    <input type="checkbox" <#if checkboxselect=="true">checked<#elseif checkboxselect=="disabled">disabled</#if>
                    onclick="if(!base.table.checkHasSelectedBoxes(this,'${CheckBoxName}')){return false;}base.table.selectCheckboxAll(this,'${CheckBoxName}');${oncheckboxselect}">
                </th>
            </#if>
            <#nested>
            <#list labels as l>
                <th><nobr>&nbsp;${l}&nbsp;</nobr></th>
            </#list>
        </tr>
    </thead>
</#macro>

<#-- row -->
<#macro Row id="" idx=-1 class="" style="" href="" onclick="" target="FrameContentBody" cache=false value="" checkboxselect="false" oncheckboxselect="">
    <#assign CurrentInRow=true/>
    <#if checkboxselect?contains("true")>
        <#assign Checked="checked"/>
    <#elseif checkboxselect?contains("default") && CheckBoxValues?? && CheckBoxValues?seq_contains(value)>
        <#assign Checked="checked"/>
    <#else>
        <#assign Checked=""/>
    </#if>
    <tr <#if id!="">id="${id}"</#if> <#if style !="">style="${style}"</#if>
    class="<#if class==""><#if idx gt -1>Row${idx%2}<#else>Row</#if><#else> ${class}</#if><#if Checked=="checked"> SelectedRow</#if>"
    onclick="${onclick};<@LoadUrl href=href target=target cache=cache/>"
        <#if CurrentTableType=="DefaultTable"> onmouseover="base.table.overRow(this)" onmouseout="base.table.outRow(this)"</#if>>
        <#if checkboxselect!="none" && CheckBoxName !=""><#-- none,true,false, disabled true,disabled false-->
            <td width="1px">
                <input type="checkbox" ${Checked}
                <#if checkboxselect?contains("disabled")>
                    disabled <#if Checked!=""> ><input type="hidden"</#if>
                <#else>
                    onclick="var status=base.table.onSelectCheckbox(this);${oncheckboxselect};"
                </#if>
                name="${CheckBoxName}" value="${value?html}">
            </td>
        </#if>
        <#nested>
    </tr>
    <#assign CurrentInRow=false/>
</#macro>
